import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Rank from '../views/Rank.vue'
import Songs from '../views/Songs.vue'
import Podcast from '../views/Podcast.vue'
import PodCastHome from '../components/podcast/PodCastHome.vue'
import Detail from "../components/podcast/Detail.vue"
import More from "../components/podcast/More.vue"

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/rank',
        name: 'Rank',
        component: Rank
    },
    {
        path: '/songs',
        name: 'Songs',
        component: Songs
    },
    {
        path: '/podcast',
        name: 'Podcast',
        component: Podcast
    },
    {
        path: '/PodCastHome',
        name: 'PodCastHome',
        component: PodCastHome
    },
    {
        path: "/detail/:id",
        name: "Detail",
        component: Detail,
        meta: {
            showTab: false
        }
    }
    ,
    {
        path: "/more/:type",
        name: "More",
        component: More,
        meta: {
            showTab: false
        }
    }
]


const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router